home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / database / ingres04.lzh / source / h / opsys.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-09-18  |  3.3 KB  |  144 lines

  1. #
  2.  
  3. /*
  4. **  OPSYS.H -- operating system dependent definitions.
  5. **
  6. **    This header file contains everything that we at Berkeley
  7. **    think might vary from system to system.  Before
  8. **    compiling INGRES you should eyeball this file to see
  9. **    if your system is consistant with us.
  10. **
  11. **    Version:
  12. **        @(#)opsys.h    8.1    12/31/84
  13. */
  14.  
  15. # ifndef USERINGRES
  16.  
  17. /*
  18. **  UNIX version flags.
  19. **    The following flags define what version of UNIX is being run.
  20. **    They should be set as follows:
  21. **
  22. **    Bell-style version six UNIX, with 8-bit user id's and 8-bit
  23. **    group id's, fetched with calls to getuid() and getgid()
  24. **    respectively, and stored in the passwd file as two separate
  25. **    eight-bit fields:
  26. **        Set the xV6_UNIX flag only.
  27. **
  28. **    Berkeley-style version 6/7x-05a UNIX, with a single 16-bit
  29. **    user id and no group id (and no getgid() or setgid() calls),
  30. **    and stored in the passwd file as two separate eight-bit fields,
  31. **    combined to make a single 16-bit field:
  32. **        Set the xB_UNIX flag only.
  33. **
  34. **    Bell-style version seven UNIX, with 16-bit user id's and
  35. **    16-bit group id's, fetched with calls to getuid() and
  36. **    getgid() respectively, and stored in the passwd file as
  37. **    two separate 16-bit fields:
  38. **        Set the xV7_UNIX flag only.
  39. */
  40.  
  41. /* set for version six */
  42. /* # define    xV6_UNIX    /* Bell v6 UNIX flag */
  43. # define    xV7_UNIX    /* Bell v7 UNIX flag */
  44. /* # define    xB_UNIX        /* Berkeley UNIX flag */
  45.  
  46.  
  47. /*
  48. **  Maximum number of open files per process.
  49. **  Must match 'NOFILE' entry in /usr/sys/param.h
  50. */
  51.  
  52. /*
  53. ** if xV7_UNIX is defined, we include <sys/param.h>, which will
  54. ** define NOFILE, so we avoid defining it here.
  55. */
  56. # ifndef    xV7_UNIX
  57. # define    NOFILE        20
  58. # endif        xV7_UNIX
  59.  
  60.  
  61. /*
  62. **    USERINGRES is the UNIX login name of the INGRES superuser,
  63. **        normally "ingres" of course.  The root of this persons
  64. **        subtree as listed in /etc/passwd becomes the root of
  65. **        the INGRES subtree.
  66. */
  67.  
  68. # define    USERINGRES    "ingres"
  69.  
  70.  
  71. /*
  72. **  Structure for 'gtty' and 'stty'
  73. */
  74.  
  75. # ifndef xV7_UNIX
  76. struct sgttyb
  77. {
  78.     char    sg_ispeed;
  79.     char    sg_ospeed;
  80.     char    sg_erase;
  81.     char    sg_kill;
  82.     int    sg_flags;
  83. };
  84. # else
  85. # ifndef linux
  86. # include    <sgtty.h>
  87. # else
  88. # include    <termios.h>
  89. # endif
  90. # endif xV7_UNIX
  91.  
  92.  
  93. /*
  94. **  Structure for 'fstat' and 'stat' system calls.
  95. */
  96.  
  97. # ifndef xV7_UNIX
  98. struct stat {
  99.     short    st_dev;        /* +0: device of i-node */
  100.     short    st_ino;        /* +2 */
  101.     short    st_mode;    /* +4: see below */
  102.     char    st_nlink;    /* +6: number of links to file */
  103.     char    st_uid;        /* +7: user ID of owner */
  104.     char    st_gid;        /* +8: group ID of owner */
  105.     char    st_sz0;        /* +9: high byte of 24-bit size */
  106.     int    st_sz1;        /* +10: low word of 24-bit size */
  107.     int    st_addr[8];    /* +12: block numbers or device number */
  108.     int    st_atime[2];    /* +28: time of last access */
  109.     int    st_mtime[2];    /* +32: time of last modification */
  110. };
  111.  
  112. #define        IALLOC    0100000
  113. #define        S_IFMT    060000
  114. #define        S_IFDIR    040000
  115. #define        IFCHR    020000
  116. #define        IFBLK    060000
  117. # endif
  118. # ifdef xV7_UNIX
  119.  
  120. # ifdef bitset
  121. # undef        bitset
  122. # undef        setbit
  123. # undef        clrbit
  124. # include    <sys/param.h>
  125. # include    <sys/stat.h>
  126. # undef        bitset
  127. # undef        setbit
  128. # undef        clrbit
  129. # define    bitset(bit, word)    ((bit) & (word))
  130. # define    setbit(bit, word)    word |= bit
  131. # define    clrbit(bit, word)    word &= ~bit
  132. # else  bitset
  133. # include    <sys/param.h>
  134. # include    <sys/stat.h>
  135. # undef        bitset
  136. # undef        setbit
  137. # undef        clrbit
  138. # endif bitset
  139.  
  140. # endif xV7_UNIX
  141.  
  142.  
  143. # endif USERINGRES
  144.